Skip to content

Act on the first round of hands-on testing - #9

Merged
walhalabi-code merged 2 commits into
mainfrom
fix/testing-findings
Aug 31, 2026
Merged

walhalabi-code merged 2 commits into
mainfrom
fix/testing-findings

Conversation

@walhalabi-code

Copy link
Copy Markdown
Owner

Seven findings from using the published package the way a stranger would.

@types/parse was declared an optional peer, but the shipped declarations require it: BaseModel is typed as extending Parse.Object. Without it, TypeScript reports "Cannot find namespace 'Parse'" and then "Property 'save' does not exist on type 'Note'" - errors that point at the user's own model rather than the missing package. It is now a required peer.

psk new installs the generated project's dependencies. Scaffolding something that cannot run until you read the next line of output was a needless step. --no-install opts out; a failed install warns and puts the step back in the next-steps list rather than leaving a project that looks finished.

The generated project can be tested. It had no runner, no example and no test script, which sat badly against a library that argues for verification. It now uses Node's own runner - nothing to install, no config - and ships five tests covering the failures that raise no error: that a field written on a model actually reaches Parse, that save() would send it, and that the schema rules are enforced.

npm audit is clean in a new project. The 14 advisories all came from transitive pins in parse-server's tree, none of them fixable by bumping a peer because parse 8.6.0 is the latest and pins ws exactly. Overrides to the patched versions of ws, follow-redirects, ip-address and uuid take it to zero. Verified that parse-server still loads and the project still builds under them.

listNotes demonstrates real pagination. It returned results.length as the count - the size of the page you already have, which tells a client nothing. It now uses withCount() for the true total in one round trip, and returns limit, skip and hasMore.

The CLI no longer describes itself as broken. "The mistakes this library fails silently on" was meant as "mistakes that produce no error", but it parses as "this library fails silently" - printed after every psk new. The mistake is now the subject, not the library.

psk new says something when it lands inside another npm project, and seed.ts is 254 lines rather than 325, with the same behaviour and half the commentary.

Docs, website and the generated README follow the CLI: six quickstart blocks, the --no-install flag, a Tests section, corrected file counts, and the search index, which duplicates page text and had gone stale again.

334 library tests pass. A generated project compiles, passes its own five tests, and audits clean.

Seven findings from using the published package the way a stranger would.

@types/parse was declared an optional peer, but the shipped declarations
require it: BaseModel is typed as extending Parse.Object. Without it,
TypeScript reports "Cannot find namespace 'Parse'" and then "Property 'save'
does not exist on type 'Note'" - errors that point at the user's own model
rather than the missing package. It is now a required peer.

psk new installs the generated project's dependencies. Scaffolding something
that cannot run until you read the next line of output was a needless step.
--no-install opts out; a failed install warns and puts the step back in the
next-steps list rather than leaving a project that looks finished.

The generated project can be tested. It had no runner, no example and no test
script, which sat badly against a library that argues for verification. It now
uses Node's own runner - nothing to install, no config - and ships five tests
covering the failures that raise no error: that a field written on a model
actually reaches Parse, that save() would send it, and that the schema rules
are enforced.

npm audit is clean in a new project. The 14 advisories all came from
transitive pins in parse-server's tree, none of them fixable by bumping a peer
because parse 8.6.0 is the latest and pins ws exactly. Overrides to the
patched versions of ws, follow-redirects, ip-address and uuid take it to zero.
Verified that parse-server still loads and the project still builds under
them.

listNotes demonstrates real pagination. It returned results.length as the
count - the size of the page you already have, which tells a client nothing.
It now uses withCount() for the true total in one round trip, and returns
limit, skip and hasMore.

The CLI no longer describes itself as broken. "The mistakes this library fails
silently on" was meant as "mistakes that produce no error", but it parses as
"this library fails silently" - printed after every psk new. The mistake is
now the subject, not the library.

psk new says something when it lands inside another npm project, and seed.ts
is 254 lines rather than 325, with the same behaviour and half the commentary.

Docs, website and the generated README follow the CLI: six quickstart blocks,
the --no-install flag, a Tests section, corrected file counts, and the search
index, which duplicates page text and had gone stale again.

334 library tests pass. A generated project compiles, passes its own five
tests, and audits clean.
All five checks failed in under 40 seconds, which is the npm ci signature: it
refuses a package.json and package-lock.json that disagree, and every job runs
it before anything else.

Making @types/parse a required peer rather than an optional one changed the
dependency tree, and the lock was not regenerated to match:

  npm error Missing: @types/parse@3.0.9 from lock file

This is the same failure diagnosed in Dependabot PR #5 earlier today - a
lockfile out of step with its package.json, killing every job before a single
test runs. Worth noting that the lesson did not transfer on the first try.

Also picks up the 3.0.0 -> 3.0.1 version bump in the lock's root entry.

Checked while regenerating: installing @types/parse alongside the library's own
src/global.d.ts does not collide. That file is not shipped - dist carries no
global.d.ts - so a consumer only ever sees @types/parse.
@walhalabi-code
walhalabi-code merged commit 37a5370 into main Aug 31, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant